package com.lhd.dao;

import com.lhd.po.Type;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by liuhandong on 2021/10/27.
 */
@Service
public interface TypeDao {

    Integer save(Type type);

    Integer update(Map map);

    Type findOne(Long id);

    Type findByName(String name);

    List<Type> findAllByPage(Integer page);

    List<Type> findAll();

    List<Type> topFive();

    Long delete(Long id);

    Integer countType();;

    Integer countTypeByTypeId(Long typeId);

    List<Type> listTypeTop(Integer i);

    List<Type> listTypeByPage(Long page);

    Integer getMaxTypeId();
}
